<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<html>
<head>
<title>Login</title>
<style type="text/css"> 
/* general */

    body{ 
		background:#d8e6ec url(/smartView/pic/bg_body.gif) repeat-x;
        font:80% Arial, Helvetica, Sans-Serif;
		color:#555;
		line-height:180%;
		margin:0;
		padding:0;
		text-align:center;
        }
	h1{
		font-size:65pt;
		font-weight:normal;
		margin:0;
		padding-left:45px;
		padding-top:100px;
		color: white;
		
		}		
	h2, h3, h4, h5, h6{
		font-weight:normal;
		margin:1em 0;
		}	
	h2{            
		font-size:160%;
		}	
	h3{          
		font-size:140%;
		}
	h4{          
		font-size:120%;
		}				
	



a {
	text-shadow: #a7a7a7 0 -1px 15px;
	color: #a7a7a9;
	font-variant: small-caps;
	-webkit-transition: 0.3s linear;
}
 a:hover {
	color: #3f3f3f;
	background-color: #778caa;
	text-shadow: #bebebe 0 1px 0;
}


	p{
		margin:1em 0;
		}		


/* // general */

/* page setup */

	#container{	
		margin:0 auto;
		width:928px;
		text-align:left;
		}
	#header{
		height: 236px;
		background:url(/smartView/pic/bg_header.jpg) no-repeat 0 0;
		}				
	#content{
		background:url(/smartView/pic/bg_content.gif) repeat-y;
		padding:.5em 34px;
		}
	#footer{
		padding:8px 60px;
		background:url(/smartView/pic/bg_footer.gif) no-repeat 0 0;				
		color:#fff;
		}				

/* //page setup */
</style>

</head> 

<body onload='document.f.j_username.focus();'>
<div id ="container">
<div id="header"><h1>   News Feed      </h1></div>
<div id="content">
<h3>security check</h3>
<p>Welcome</p>
<p> You are <sec:authentication property="name"/> </p>
<br>

<sec:authorize ifNotGranted="ROLE_USER, ROLE_ADMINISTRATOR">
<h3>Login with Username and Password</h3>
<form name='f' action='/smartView/j_spring_security_check' method='POST'>
 <table>
    <tr><td>User:</td><td><input type='text' name='j_username' value=''></td></tr>
    <tr><td>Password:</td><td><input type='password' name='j_password'/></td></tr>
    <tr><td><input type='checkbox' name='_spring_security_remember_me'/></td><td>Remember me on this computer.</td></tr>
    <tr><td><input name="submit" type="submit" value="login"/></td>
    <td><input name="reset" type="reset" value="reset"/></td></tr>
  </table>
If you are not a member, <a href="/smartView/pages/register.jsp"/>click to register
</form>
</sec:authorize>
<sec:authorize ifAnyGranted="ROLE_USER, ROLE_ADMINISTRATOR">
	<b>welcome <sec:authentication property="principal.username"/></b><br>
		<a href="/smartView/spring/news/main">go Main</a><br>
		<a href="/smartView/j_spring_security_logout">Logout</a>
		<br>
</sec:authorize>
</div>
<div id="footer"></div>
</div>
</body>
</html>